package com.yidu.menuProject.common;

/**
 * 分页类
 * @author zoutian
 * date2018年7月5日
 *
 */
public class Pages {
	//当前页
    private Integer page=1;
    //页大小
    private Integer rows=10;
    // 总记录 数
    private Integer totalRecord;
    //总页数
    private Integer totalPage;
    //开始记录位置  
    private Integer start;  
    //用户名称
    private String mealName;
  //用户名称
    private String userName;
    private String manUser;
    private String mealId;
	public String getMealName() {
		return mealName;
	}

	public void setMealName(String mealName) {
		this.mealName = mealName;
	}

	public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getRows() {
        return rows;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(Integer totalRecord) {
        this.totalRecord = totalRecord;
    }

    public Integer getTotalPage() {
        totalPage=(totalRecord-1)/rows+1;
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {

        this.totalPage = totalPage;
    }


    public Integer getStart() {
        start=(page-1)*rows;
        return start;
    }

    public void setStart(Integer start) {

        this.start = start;
    }
    
   
    public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getManUser() {
		return manUser;
	}

	public void setManUser(String manUser) {
		this.manUser = manUser;
	}
	
	/**
	 * @return the mealId
	 */
	public String getMealId() {
		return mealId;
	}

	/**
	 * @param mealId the mealId to set
	 */
	public void setMealId(String mealId) {
		this.mealId = mealId;
	}

	public Pages() {
    	
    }

	
	/**
	 * <p>Title:</p>
	 * <p>Description:</p>
	 * @param page
	 * @param rows
	 * @param totalRecord
	 * @param totalPage
	 * @param start
	 * @param mealName
	 * @param userName
	 * @param manUser
	 * @param mealId
	 */
	public Pages(Integer page, Integer rows, Integer totalRecord, Integer totalPage, Integer start, String mealName,
			String userName, String manUser, String mealId) {
		super();
		this.page = page;
		this.rows = rows;
		this.totalRecord = totalRecord;
		this.totalPage = totalPage;
		this.start = start;
		this.mealName = mealName;
		this.userName = userName;
		this.manUser = manUser;
		this.mealId = mealId;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Pages [page=" + page + ", rows=" + rows + ", totalRecord=" + totalRecord + ", totalPage=" + totalPage
				+ ", start=" + start + ", mealName=" + mealName + ", userName=" + userName + ", manUser=" + manUser
				+ ", mealId=" + mealId + "]";
	}
}